home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.2 KB | 49 lines | [TEXT/GEOL] |
- Item 7114194 29-Sept-90 12:51PDT
-
- From: MORTENSEN.K Mortensen, Keith
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Items in Lists
-
- Could someone help me with a particular problem with lists and MacAPP?
-
- I have a dialog with a list, an OK and Cancel button.
-
- As soon as the dismisser OK button is hit, I want to know what item was
- selected or double-clicked in the list TMyListView.
-
-
-
- class TMyListView : public TTextListView {
- public:
- pascal virtual void GetItemText(short anItem, StringPtr aString);
- };
-
-
- void ShowListDialog()
- {
- const IDType kDialogView = 'dlog'; // dialog view identifier
- const IDType kOK = 'okok'; // OK button identifier
- const IDType kCancel = 'cncl';// Cancel button identifier
-
- Str255 aString;
-
- TWindow *aWindow = NewTemplateWindow(kListWindowID, NULL);
- TDialogView *aDialogView = (TDialogView *) aWindow->FindSubView(kDialogView)
- IDType dismisser = aDialogView->PoseModally();
-
- if (dismisser == kOK)
- {
- // Need to know which item in list was selected or double-clicked.
- }
-
- aWindow->Close(); // dispose of the dialog window
- }
-
-
- Keith Mortensen
- Apple Computer, Inc.
- MORTENSEN.K
-
-